package com.tnr.scgcxx.dao.info;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.dq.base.page.PageParam;

import com.tnr.scgcxx.dto.CustomerDto;
import com.tnr.scgcxx.model.Customer;

public interface CustomerDao {
	
	@Select("select cus_id,cus_name,cus_remark,cus_status from info_customer")
	public List<Customer> findAllCustomers();
	
	//@Select("select cus_id,cus_name,cus_remark,cus_status from info_customer")
	public List<Customer> findCustomersPage(PageParam pageParam);

	@Insert("insert into info_customer(cus_id,cus_name,cus_remark,cus_status) values(#{cus_id},#{cus_name},#{cus_remark},#{cus_status})")
	public int insertCustomer(CustomerDto dto);

	
	public int updateCustomer(CustomerDto dto);

	
	@Select("select cus_id,cus_name,cus_remark,cus_status from info_customer where cus_id=#{cus_id}")
	public Customer findCustomerbyId(String cus_id);

	public int deleteCustomerByIds(Integer... cus_ids);

}
